package com.testes.umov.view;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

import com.testes.umov.R;

public class MainActivity extends Activity {

	private Button buttonTestExpressions, buttonTestDataBase, buttonTestScreens, buttonTestSync;
	private int i = 0;
	
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main); 
        this.startTests();
        setButtons();
    }
    
    private void setButtons() {
    	buttonTestDataBase = (Button)findViewById(R.id.main_screen_button_database_tests);
    	buttonTestDataBase.setOnClickListener(new OnClickListener() 
    	{
			@Override
			 public void onClick(View v) {
				// TODO Auto-generated method stub				
			}
		});
    	
    	buttonTestExpressions = (Button)findViewById(R.id.main_screen_button_expressions_tests);
    	buttonTestExpressions.setOnClickListener(new OnClickListener() 
    	{
			@Override
			 public void onClick(View v) {
				// TODO Auto-generated method stub				
			}
		});
    	
    	buttonTestScreens = (Button)findViewById(R.id.main_screen_button_screen_tests);
    	buttonTestScreens.setOnClickListener(new OnClickListener() 
    	{
			@Override
			 public void onClick(View v) {
				Intent intent = new Intent(getBaseContext(), ScreenTestsActivity.class);
				startActivity(intent);
			}
		});
    	
    	buttonTestSync = (Button)findViewById(R.id.main_screen_button_sync_tests);
    	buttonTestSync.setOnClickListener(new OnClickListener() 
    	{
			@Override
			 public void onClick(View v) {
				Intent intent = new Intent(getBaseContext(), SyncTestActivity.class);
				startActivity(intent);
			}
		});
    	
    	
    }
    

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.activity_main, menu);
        return true;
    }
    
   
    
    private void startTests() {
    	   
    	
    }

	/*@Override
	public void onBatteryLevelChanged(float level, float startingLevel, float spentLevel) {
		String text = "Level: " + level + "% - Start: " + startingLevel + "% - Spent: " + spentLevel + "%";
		//Toast toast = Toast.makeText(this, text, Toast.LENGTH_LONG);
		//toast.show();		
		if(this.i == 0) {
			this.textViewShit.setBackgroundColor(Color.BLUE);
			this.textViewShit.setTextColor(Color.WHITE);
			this.i = 1;
		}
		else {
			this.textViewShit.setBackgroundColor(Color.GREEN);
			this.textViewShit.setTextColor(Color.WHITE);
			this.i = 0;
		}
		this.textViewShit.setText(text);
		
	}*/
}
